package com.fcbox.bypass;

import com.alibaba.fastjson.JSON;
import com.fcbox.uic.facade.user.UserFacade;
import com.fcbox.uic.fdto.ResultDTO;
import com.fcbox.uic.fdto.user.BaseUserDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;

/**
 * application
 * Created by 000498 on 2017/5/12.
 */
@SpringBootApplication
@ImportResource("classpath:app-dubbo-client-context.xml")
@Slf4j
public class Application implements CommandLineRunner{
	@Autowired
	UserFacade userFacade;

	@Override
	public void run(String... strings) throws Exception {
		ResultDTO<BaseUserDTO> userInfo = userFacade.getUserInfo("15680908680");
		log.info("******************userInfo:{}", JSON.toJSONString(userInfo));
	}

	public static void main(String[] args) {
		SpringApplication.run(Application.class, args);
	}
}
